package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Department;
import cn.wolfcode.crm.query.QueryObject;
import java.util.List;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Department record);

    Department selectByPrimaryKey(Long id);

    List<Department> selectAll();

    int updateByPrimaryKey(Department record);

    int queryCount(QueryObject qo);

    List<Department> queryList(QueryObject qo);

    /**
     * 根据ID改变部门的ID
     * @param id
     */
    void changeState(Long id);

    /**
     * 部门编号校验操作
     * @param sn
     * @return
     */
    Department validateName(String sn);

    Department selectByDepartmentName(String deptName);
}